//
//  Header.h
//  ZTuo_QuantivitiTrasaction
//
//  Created by chu on 2018/11/5.
//  Copyright © 2018 chu. All rights reserved.
//

#ifndef Header_h
#define Header_h

#define USERINFO @"USERINFO"

#import "AppDelegate.h"
#import "ColorPlate.h"
#import "CategoryHeader.h"
#import "ZTNavigationController.h"
#import "BaseViewController.h"
#import "ZTTabBarController.h"

#import "ThirdParty.h"
#import "Toolheader.h"
#import "YLUserInfo.h"
#import "CYProjectModel.h"
#import "CYCommentModel.h"
#import "ZTResourceViewController.h"
#import "CYChatViewController.h"
#import "CYGeRenZhuYeViewController.h"
#import "WXApi.h"
#import <TencentOpenAPI/TencentOAuth.h>
#import <TencentOpenAPI/QQApiInterface.h>
#import <TencentOpenAPI/QQApiInterfaceObject.h>
#import "QTShareView.h"
#import "CYGeRenZhuYeViewController.h"


#define   HOST     @"https://flow.api.959.cn/v2/"//生产
#define   User_HOST     @"https://user.api.959.cn/v2/"//生产
#define   Api_HOST     @"https://openapi.959.cn/v1/"//生产

//#define   HOST     @"http://flow.loverblog.cn/v2/"//测试
//#define   User_HOST     @"https://user.api.loverblog.cn/v1/"//测试
//#define   Api_HOST     @"http://api.loverblog.cn/v1/"//测试

#define UserPhone @"phoneNum"

#define Loading   @"加载中..." 
#define ResErrorMessage   @"请检查您的网络连接"
#define Response_code   @"code"
#define Response_value   200
#define Response_Message   @"msg"

#define kWindowH   [UIScreen mainScreen].bounds.size.height //应用程序的屏幕高度
#define kWindowW    [UIScreen mainScreen].bounds.size.width  //应用程序的屏幕宽度
#define kWindowHOne    [UIScreen mainScreen].bounds.size.height / 667 //应用程序的屏幕单位高度
#define kWindowWHOne    [UIScreen mainScreen].bounds.size.width / 375 //应用程序的屏幕单位宽度

#define UserToken [[NSUserDefaults standardUserDefaults] objectForKey:@"token"]

#ifdef DEBUG
#define NSLog(format, ...) printf("\n[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
#else
#define NSLog(format, ...)
#endif


//判断是否是ipad
#define isPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
//判断iPhoneX
#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPHoneXr
#define IS_IPHONE_Xr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneXs
#define IS_IPHONE_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneXs Max
#define IS_IPHONE_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)

//iPhoneX系列
#define Height_StatusBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 44.0 : 20.0)
#define Height_NavBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 88.0 : 64.0)
#define Height_TabBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 83.0 : 49.0)
#define SafeAreaBottomHeight ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 34 : 0)

//国际化
#define LocalizationKey(key) [[ChangeLanguage bundle] localizedStringForKey:key value:nil table:@"English"]
#define LocalLanguageKey         @"LocalLanguageKey" //选择语言

#endif /* Header_h */
